package com.kylin.domain.commodity.event

import org.axonframework.modelling.command.TargetAggregateIdentifier
import java.time.LocalDateTime


abstract class SpuStateChangedEvent (
        @TargetAggregateIdentifier
        val spuId: Long,
        val updatedBy: Long,
        val updatedAt: LocalDateTime
)

/**
 * 审核状态变更事件
 */
class SpuApprovedEvent(spuId: Long, updatedBy: Long)
    : SpuStateChangedEvent(spuId, updatedBy, LocalDateTime.now())
class SpuRejectedEvent(spuId: Long, updatedBy: Long)
    : SpuStateChangedEvent(spuId, updatedBy, LocalDateTime.now())
class SpuShelvedEvent(spuId: Long, updatedBy: Long)
    : SpuStateChangedEvent(spuId, updatedBy, LocalDateTime.now())
class SpuPutOffedEvent(spuId: Long, updatedBy: Long)
    : SpuStateChangedEvent(spuId, updatedBy, LocalDateTime.now())
class SpuRemovedEvent(spuId: Long, updatedBy: Long)
    : SpuStateChangedEvent(spuId, updatedBy, LocalDateTime.now())
